//
// Copyright © 2021 dev. All rights reserved.
// 

import Foundation


public extension XPCConnectionValidator {
    static let shared:XPCConnectionValidator = {
        let requirements:String
        #if DEBUG
        requirements = "anchor apple generic and (certificate leaf[subject.OU] = \"8C7439RJLG\" or certificate leaf[subject.OU] = \"SY64MV22J9\")"

        #else
        requirements = "anchor apple generic and (certificate leaf[subject.OU] = \"8C7439RJLG\" or certificate leaf[subject.OU] = \"SY64MV22J9\")"

        #endif

        guard let validator = XPCConnectionValidator(requirements: requirements) else {
            fatalError("Failed to initialize XPC connection validator with the specified requirements: \(requirements)")
        }
        return validator
    }()

}
